import request from '@/utils/request'

// 查询代理商分账列表
export function listSharingRecord(query) {
  return request({
    url: '/business/sharingRecord/list',
    method: 'get',
    params: query
  })
}

// 查询代理商分账详细
export function getSharingRecord(id) {
  return request({
    url: '/business/sharingRecord/' + id,
    method: 'get'
  })
}

// 新增代理商分账
export function addSharingRecord(data) {
  return request({
    url: '/business/sharingRecord',
    method: 'post',
    data: data
  })
}

// 修改代理商分账
export function updateSharingRecord(data) {
  return request({
    url: '/business/sharingRecord',
    method: 'put',
    data: data
  })
}

// 删除代理商分账
export function delSharingRecord(id) {
  return request({
    url: '/business/sharingRecord/' + id,
    method: 'delete'
  })
}

export function wxProfitSharing(data) {
  return request({
    url: '/business/sharingRecord/wxProfitSharing',
    method: 'post',
    data: data
  })
}
